Question: Square $ABCD$ has center $O,\ AB=900,\ E$ and $F$ are on $AB$ with $AE<BF$ and $E$ between $A$ and $F, m\angle EOF =45^\circ,$ and $EF=400.$ Given that $BF=p+q\sqrt{r},$ where $p,q,$ and $r$ are positive integers and $r$ is not divisible by the square of any prime, find $p+q+r.$

Explanation: [asy] size(200); defaultpen(linewidth(0.7)+fontsize(10)); pair A=(0,9), B=(9,9), C=(9,0), D=(0,0), E=(2.5-0.5*sqrt(7),9), F=(6.5-0.5*sqrt(7),9), G=(4.5,9), O=(4.5,4.5); draw(A--B--C--D--A);draw(E--O--F);draw(G--O); dot(A^^B^^C^^D^^E^^F^^G^^O); label("\(A\)",A,(-1,1));label("\(B\)",B,(1,1));label("\(C\)",C,(1,-1));label("\(D\)",D,(-1,-1)); label("\(E\)",E,(0,1));label("\(F\)",F,(1,1));label("\(G\)",G,(-1,1));label("\(O\)",O,(1,-1)); label("\(x\)",E/2+G/2,(0,1));label("\(y\)",G/2+F/2,(0,1)); label("\(450\)",(O+G)/2,(-1,1));  [/asy]
Let $G$ be the foot of the perpendicular from $O$ to $AB$. Denote $x = EG$ and $y = FG$, and $x > y$ (since $AE < BF$ and $AG = BG$). Then $\tan \angle EOG = \frac{x}{450}$, and $\tan \angle FOG = \frac{y}{450}$.
By the tangent addition rule $\left( \tan (a + b) = \frac{\tan a + \tan b}{1 - \tan a \tan b} \right)$, we see that\[\tan 45 = \tan (EOG + FOG) = \frac{\frac{x}{450} + \frac{y}{450}}{1 - \frac{x}{450} \cdot \frac{y}{450}}.\]Since $\tan 45 = 1$, this simplifies to $1 - \frac{xy}{450^2} = \frac{x + y}{450}$. We know that $x + y = 400$, so we can substitute this to find that $1 - \frac{xy}{450^2} = \frac 89 \Longrightarrow xy = 150^2$.
Substituting $x = 400 - y$ again, we know have $xy = (400 - y)y = 150^2$. This is a quadratic with roots $200 \pm 50\sqrt{7}$. Since $y < x$, use the smaller root, $200 - 50\sqrt{7}$.
Now, $BF = BG - FG = 450 - (200 - 50\sqrt{7}) = 250 + 50\sqrt{7}$. The answer is $250 + 50 + 7 = \boxed{307}$.